export interface ResponseData {
  code: number;
  message: string;
  ok: boolean;
}

export interface SupData {
  id?: number;
  spuName: string;
  description: string;
  category3Id: string | number;
  tmId: number | string;
  spuSaleAttrList: null | SpuSaleAttrList[];
  spuImageList: null | SpuImageList[];
  spuPosterList: null | SpuPosterList[];
}

export type Records = SupData[];
export interface HasSpuResponseData extends ResponseData {
  data: {
    records: Records;
    total: number;
    size: number;
    current: number;
    orders: [];
    optimizeCountSql: boolean;
    hitCount: boolean;
    countId: null;
    maxLimit: null;
    searchCount: boolean;
    pages: number;
  };
}

export interface Trademark {
  id: number;
  tmName: string;
  logoUrl: string;
  createTime: string;
  updateTime: string;
}

export interface AllTradeMark extends ResponseData {
  data: Trademark[];
}

export interface SpuSaleAttrValueList {
  baseSaleAttrId: number;
  createTime: string;
  id: number;
  isChecked: null;
  saleAttrName: string;
  saleAttrValueName: string;
  spuId: number;
  updateTime: string;
}

export interface SpuSaleAttrList {
  id?: number;
  spuId: number;
  baseSaleAttrId: number;
  saleAttrName: string;
  spuSaleAttrValueList: SpuSaleAttrValueList[];
}
export interface SpuImageList {
  id: number;
  spuId: number;
  imgName?: string;
  imgUrl?: string;
  name?: string;
  url?: string;
}

export interface SpuPosterList {
  id: number;
  spuId: number;
  imgName: string;
  imgUrl: string;
}

export interface BaseSpuResponseData extends ResponseData {
  data: {
    id: number;
    spuName: string;
    description: string;
    category3Id: number | string;
    tmId: number;
    spuSaleAttrList: SpuSaleAttrList[];
    spuImageList: SpuImageList[];
    spuPosterList: SpuPosterList[];
    name?: string;
    url?: string;
  };
}

export interface AllSaleAttr {
  id: number;
  createTime: string;
  updateTime: string;
  name: string;
}

export interface AllSaleAttrResponseData extends ResponseData {
  data: AllSaleAttr[];
}
